-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement mandarins (WIP) #179
base: master
Are you sure you want to change the base?
Conversation
Rebased onto master and added a commit with a few comments. |
Codecov Report
@@ Coverage Diff @@
## master #179 +/- ##
==========================================
- Coverage 78.60% 75.45% -3.16%
==========================================
Files 43 37 -6
Lines 18454 17240 -1214
==========================================
- Hits 14506 13008 -1498
- Misses 3948 4232 +284
|
9683114
to
39dd76f
Compare
39dd76f
to
a00c52f
Compare
Rebased onto master and again added a few comments. I'm gonna look into some profiles now. |
I profiled a Maybe, if we rewrote those functions in C or in Julia, we would get rid of most of the overhead. For the profiling runs and a comparison of the time spent per functions, see the |
Also, |
Continued work a bit and rebased onto master. I simplified a few parts, but am not 100% sure that all simplifications are correct. |
rebased onto master |
Closed in favor of #280. |
As @fingolfin mentioned in a call a few months ago, this will give us a reliable probability estimate as to whether the kernels were constructed correctly. Thus I'll continue work on this PR. |
9b7a186
to
2c4b084
Compare
Squashed and rebased onto master. |
873155c
to
949dce8
Compare
Rebased onto #308. That makes it easier for me to extend RecogniseGeneric. |
So, there are a few errors in the tests and tests now also take 21 minutes on my machine compared to roughly 13 minutes on the GitHub machines. It might have to do with me not storing the SLPs of the mandarins yet. I'll have a look at some profiles. |
I seem to not get errors anymore but instead there might be an infinite loop in Also, I had a look at Mandarins in CompositionTree again. They compute SLPs for mandarins in the leaves. For mandarins in inner nodes, they from their SLPs from mandarin SLPs in the children. I think this is the magma line which does the job:
So if I understand correctly they create SLPs for the images, and then take each mandarin divided by a preimage of its image, and then find an SLP for that kernel element. In the end, glue everything together. Afterwards, they test whether the evaluating the SLP yields the original mandarin. I bet this is a lot quicker than recomputing SLPs all the time, which is what I'm currently doing. First I need to get rid of this infinite loop though. |
The infinite loop was resolved by ignoring nodes recognised by |
This leaves three open points:
|
Of course there's also documentation! :D And I vaguely remember something from an email by Eamonn O'Brien, I might be mixing up something though: if the SLPs in a computation become too long because we generated lots of random elements by product replacement, then it might make sense to reset the product replacement random generator of the group in question so that the SLPs become shorter again. 🤔 |
684cd2a
to
f7be240
Compare
I'm working on the SLP business. I expect tests to fail. |
f7be240
to
faf71d4
Compare
I added a bunch more commits. Everything seems to be correct and the slow-down due to mandarins seems to be OK-ish for most tests. When we use mandarins immediate verification never finds incorrect kernels anymore, which makes sense since that's the whole point of the mandarins. So I'll see whether I can speed things up by disabling immediate verification when mandarins are enabled. There are a few tests which become more than two times slower though. In some, mandarin crises get triggered (that is we found out that some kernel was too small) which leads to recomputing half the tree. I think I could improve upon that by being more conservative about which part of the tree gets thrown away during a crisis. If that doesn't resolve the reason for the crisis, we can still chop off more of the tree. However, there also are a few tests which become super slow, even though no crisis was triggered. I'll have to look into that too. |
Old commit msg of a commit which was squashed into this one and which was nonsense: RecogniseGeneric: recognise image only once This is preparation for the implementation of Mandarins. The following case is going to be handled by the Mandarins. Previously, if in an image node writing of random elements as SLPs in the image node's nice generators failed, that image node would be discarded and recomputed.
9b9edb0
to
11b833e
Compare
See issue #85
This is incomplete, I didn't work on this for months, but I want it here so that @ssiccha can see. Currently thing are way too slow and I don't yet understand why; I have the suspicion that
PseudoRandom
is too slow, but I do no yet understand why. This needs to be profiled and understood.